{if $smarty.get.act eq "addshippingmethod"}
	{include file="BgcmsWebshop/Shippingmethod/create.tpl"}
{else}
<div class="wrap">

{if $shippingmethod_message == null}
	<div id="ajaxResponse1" class="ajaxResponse"></div>
{else}
	<div id="ajaxResponse1" class="ajaxResponse fade" style="display:block">{$shippingmethod_message}</div>
{/if}
<h2>{TranslateTag}B_LABEL_SHIPPING_METHOD{/TranslateTag}</h2>
	<p>
		<a href="?module={$smarty.get.module}&sub1={$smarty.get.sub1}&act=addshippingmethod"><img src="../view/admin/images/object_create.png" alt="Create" /></a>
	</p>
	<table class="widefat">
		<thead>
		<tr>
			<th scope="col" width="10%" style="text-align: left">{TranslateTag}B_LABEL_CODE{/TranslateTag}</th>
			<th scope="col" width="30%">{TranslateTag}B_LABEL_NAME{/TranslateTag}</th>
	        <th scope="col" width="20%" style="text-align: right">{TranslateTag}B_LABEL_COST{/TranslateTag}</th>
	        <th scope="col" width="5%">{TranslateTag}B_LABEL_CURRENCY{/TranslateTag}</th>
	        <th scope="col" width="5%">{TranslateTag}B_LABEL_DISPLAY{/TranslateTag}</th>
	        <th colspan="2" width="30%" style="text-align: center">{TranslateTag}B_LABEL_ACTION{/TranslateTag}</th>
		</tr>
		</thead>
		<tbody id="shippingmethodtable">
			{foreach name=shippingmethod from=$SHIPPINGMETHOD item=item}
				<tr id="{$item->code}" class="{cycle values=,alternate}">
					<th scope='row' width="10%" style='text-align: left'>{$item->code}</th>
					<td width="30%">{$item->name}</td>
					<td width="20%" style="text-align: right">{$item->delivery_cost}</td>
					<td width="5%">{$item->symbol_left}</td>
                    <td width="5%" align="center">
                    	{if $item->status eq 1}
                    		<img src="../view/admin/images/button_ok.png" alt="OK" />
                        {else}
                         	<img src="../view/admin/images/button_cancel.png" alt="cancel" />
                         {/if}      
                    </td>
					<td width="15%" style="text-align: center">
                    	<a href="?module={$smarty.get.module}&sub1=shippingmethod&act=editshippingmethod&id={$item->code}" 
							class='edit'><img src="../view/admin/images/object_edit.png" alt="Edit" /></a></td>
					<td width="15%" style="text-align: center">
						<a onclick="onDeleteShippingMethod('?module={$smarty.get.module}&sub1=shippingmethod', '{$item->code}', 'ajaxResponse1')" 
							class='delete'><img src="../view/admin/images/object_delete.png" alt="Delete" /></a></td>
				</tr>
			{/foreach}
		</tbody>
	</table>
	<p>
		<a href="?module={$smarty.get.module}&sub1={$smarty.get.sub1}&act=addshippingmethod"><img src="../view/admin/images/object_create.png" alt="Create" /></a>
	</p>
	
</div>
{/if}